package com.jinyao.exploit.common.base.dao;

import com.jinyao.exploit.common.base.entity.BaseResult;
import org.springframework.web.bind.annotation.*;

import java.util.List;

/***********************************************************************
 * 文件说明：
 * 创建信息：李晋 2019/01/18 14:42
 * 变更履历： 
 ***********************************************************************/
public interface TreeFeignDao<T>{
    @GetMapping(value = "get")
    BaseResult get(@RequestParam(value = "id") long id);
    @PostMapping(value = "get")
    BaseResult get(@RequestBody T t);
    @PostMapping(value = "list")
    BaseResult list(@RequestBody T t);
    @RequestMapping(value = "save")
    BaseResult save(@RequestBody T t);
    @PostMapping(value = "delete")
    BaseResult delete(@RequestParam(value = "id") long id);
    @PostMapping(value = "delete")
    BaseResult delete(@RequestBody T t);
    @PostMapping(value = "batchDelete")
    BaseResult batchDelete(@RequestBody List<String> idList);
    @PostMapping(value = "batchInsert")
    BaseResult batchInsert(@RequestBody List<String> idList);
    @PostMapping(value = "findByParentIdsLike")
    BaseResult findByParentIdsLike(@RequestBody T entity);
    @PostMapping(value = "findByParentIdsLike")
    BaseResult updateParentIds(@RequestBody T entity);
}
